<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div>
    <el-form ref="form" :model="t_worktime" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 增加时间 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="标题" prop="work_title">
              {{t_worktime.work_title}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="加班日期" prop="work_day">
              {{t_worktime.work_day}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="开始时间" prop="startHour">
              {{t_worktime.start_hour}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="结束时间" prop="endHour">
              {{t_worktime.end_hour}}
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div class="form-unit">
        <span class="mvc-title-left"> 加班人员 </span>
      </div>
      <el-table :data="s_staff">
        <el-table-column label="#" align="center" type='index'>
        </el-table-column>
        <el-table-column label="加班人员姓名" prop="contact_name">
        </el-table-column>
        <el-table-column label="联系方式" prop="relation_tel">
        </el-table-column>
        <el-table-column label="岗位" prop="role">
        </el-table-column>
      </el-table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'Overtimedetil',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        t_worktime: {
          work_title: null,
          work_day: null,
          start_hour: null,
          end_hour: null,
        },
        s_staff: [],
        loading: false,
        rules: {
          work_title: [{
            required: true,
            message: "标题不能为空",
            trigger: 'blur',
          }],
          work_day: [{
            required: true,
            message: "加班日期不能为空",
            trigger: 'blur',
          }],
        }
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/system/OvertimeSet/overtimedetil?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
